var timeline = arrayOfNulls(25);
for (var i = 0; i < timeline.length; i++) {
    timeline[i] = i;
}


var myChart = echarts.init(document.getElementById('graph'));
var option = {
    title: {
        text: 'ECharts 入门示例'
    },
    tooltip: {},
    legend: {
        left: 'right',
        data: ['AQI']
    },
    xAxis: {
        type : 'category',
        boundaryGap : false,
        axisLabel: {
            interval: 0,
            rotate: -45
        },
        data: timeline
    },
    yAxis: {},
    series: [{
        name: 'AQI',
        type: 'line',
        lineStyle: {
            normal: {
                color: "#233333"
            }
        },
        itemStyle: {
            normal: {
                color: '#233333',
                label: {show: true}
            }
        },
        data: [5, 20, 36, undefined, 10, 10, 20, 20]
    }]
};
myChart.setOption(option);

myChart.changeOption = function (callback) {
    var opt = this.getOption();
    callback(opt);
    this.setOption(opt);
};

